home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / PowerPlant / Window Utilities / UWindowStagger.h < prev    next >
Encoding:
Text File  |  1997-01-31  |  1.5 KB  |  52 lines  |  [TEXT/R*ch]

  1. // ===========================================================================
  2. //    File:                        UWindowStagger.h
  3. // Version:                    1.0.1 - Jan 31, 1997
  4. //    Author:                    Mike Shields (mshields@inconnect.com)
  5. //                            
  6. //    Copyright ©1996 Mike Shields. All rights reserved.
  7. // ===========================================================================
  8. //    UWindowStagger.cp        <- double-click + Command-D to see class declaration
  9. //
  10. // Static class which allows you to stagger windows on the desktop in an intelligent
  11. // manner.
  12.  
  13. #pragma once 
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. #endif
  18.  
  19. #ifndef __QUICKDRAW__
  20. #include <Quickdraw.h>
  21. #endif
  22.  
  23. class LWindow;
  24.  
  25. const short        kHorizWindowStaggerAmount    = 8;
  26. const short        kVertWindowStaggerAmount    = 20;
  27.  
  28.  
  29. class UWindowStagger
  30. {
  31. public:
  32.     static void            StaggerFromPosition(LWindow* inWindow, Point inPosition, 
  33.                                                         short inDeltaH = kHorizWindowStaggerAmount, 
  34.                                                         short inDeltaV = kVertWindowStaggerAmount);
  35.     static void            Stagger(LWindow* inWindow, 
  36.                                         short inDeltaH = kHorizWindowStaggerAmount, 
  37.                                         short inDeltaV = kVertWindowStaggerAmount);
  38.  
  39.     static void            ForceOnScreen(LWindow* inWindow);
  40.     
  41.     static void            GetMonitorRect(WindowPtr inFrontWindow, Rect& outMonitorRect);
  42.  
  43.     static Boolean        IsPositionUnique(Point inPosition);
  44.  
  45.     static void            MakePositionUnique(LWindow* inWindow, Point &inNewPosition, 
  46.                                                         Point inTopLeft, Point inDelta, 
  47.                                                         const Rect& inMonitorRect);
  48.  
  49.     static Boolean        WillWindowFit(LWindow* inWindow, Point inCurrentPosition, 
  50.                                                 const Rect& inMonitorRect);
  51. };
  52.